" 测试for循环功能
echo 'Testing for loop functionality'

" 创建一个列表
let numbers = [1, 2, 3, 4, 5]
echo 'Numbers list:' numbers

" 遍历列表并打印每个元素
for i in numbers
    echo 'Number:' i
endfor

" 创建一个字符串列表
let fruits = ['apple', 'banana', 'orange']
echo 'Fruits list:' fruits

" 遍历字符串列表
for fruit in fruits
    echo 'Fruit:' fruit
endfor

" 测试嵌套循环
let matrix = [[1, 2], [3, 4]]
echo 'Matrix:' matrix

for row in matrix
    echo 'Row:' row
    for element in row
        echo '  Element:' element
    endfor
endfor

echo 'For loop tests completed'